<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="html5plus://ready"></script>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../../css/page/Visitor.css" />
		<script src="../../js/flexible.min.js"></script>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">来访者</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view">
				<li v-for="(item,index) in items" class="mui-table-view-cell mui-media" v-on:click="openBlog(index)">
					<a href="javascript:;" class="mui-navigate-right">
						<img class="mui-media-object mui-pull-left" :src="item.headimg">
						<div class="mui-media-body nick_name">
							{{item.nick_name}}
							<p class="mui-ellipsis">{{item.send_time|gettime}}访问了你的页面</p>
						</div>
					</a>
				</li>
			</ul>
			<div v-if="vs!=0">
				<div class="fang-center">
					<div class="fang-moreimg">
						<img v-for="item in wds" :src="item" />
					</div>
					<p class="fang-num">还有<span>{{vs}}</span>个来访者</p>
					<p class="fang-v">
						<img src="../../img/my/myprofile_svip_icon.png" />
						<span>开通会员查看所有访问您的人</span>
					</p>
					<div class="kaitong">
						<button v-on:click="openVip">立即开通</button>
					</div>
				</div>
				<div class="fang-bottom">
					<p>开通会员，你还能享受什么？</p>
					<div class="huiyuan-bigimg">
						<img src="../../img/wallet/wallet_vip.png" alt="" />
					</div>
				</div>
			</div>
		</div>

		<script src="../../js/mui.min.js"></script>
		<script src="../../js/function.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			mui.init();
			var shenhe =true;
			if(!isallpay()) {
				shenhe =false
			}
			var ada = [];
			var vis = new Vue({
				el: '.mui-content',
				data: {
					items: [],
					vs: 0,
					wds: []
				},
				methods: {
					openBlog: function(ii) {
						openPersonalBlog(this.items[ii]['user_id'], this.items[ii]['headimg'], this.items[ii]['nick_name']);
					},
					openVip: function() {
						openWallet('wallet.html',2)

					}
				},
				filters: {
					gettime: function(value) {
						var date = new Date(value * 1000);
						var m = date.getMonth() + 1;
						var d = date.getDate();
						var H = date.getHours();
						var i = date.getMinutes();
						var s = date.getSeconds();
						var t = m + '月' + d + '日 ' + H + ':' + i + ':' + s;
						return t
					}
				}
			})
			var lf = plus.storage.getItem('LaiData');
			if(lf) {
				ada = JSON.parse(lf);
			}
			if(shenhe && !isvipcoin(false) && ada.length > 1) {
				vis.vs = ada.length - 1;
				vis.items.push({
					user_id: ada[0].user_id,
					nick_name: ada[0].nick_name,
					headimg: ada[0].headimg,
					send_time: ada[0].send_time
				})
				mui.each(ada, function(key, value) {
					if(key > 0) {
						if(key < 6) {
							vis.wds.push(value.headimg)
						} else {
							return false;
						}
					}
				})
			} else {
				vis.items = ada;
			}
		</script>
	</body>

</html>